package com.woniuxy.tfss.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniuxy.tfss.entity.Address;
import com.woniuxy.tfss.mapper.AddressMapper;
import com.woniuxy.tfss.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {
    @Autowired
    private AddressMapper addressMapper;
    @Override
    public List<Address> getAdressByUserId(Integer id) {
        QueryWrapper<Address> wrapper=new QueryWrapper<>();
        wrapper.eq("userid",id);
        return addressMapper.selectList(wrapper);
    }
}
